package com.hbnu.exception;

import java.util.Scanner;

public class ExceptionDemo7 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int x = scanner.nextInt();
        int y = scanner.nextInt();
        double result = 0;
        try {
            result = divided(x,y);
        } catch (Exception e) {
            System.out.println("产生了异常");
        }
        System.out.println(result);
    }

    private static double divided(int x, int y) throws Exception{
        int result = x/y;
        return result;
    }
}
